package com.xuecheng.basic.api;

import com.xuecheng.commons.model.vo.CategoryVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("xc-basic-service") //ip:60020
public interface BasicClient {

    /**
     * 定义feign接口时，返回值如果需要泛型，必须写。
     *   如果不写泛型，将内部对象转化为Map
     */
    @GetMapping("/category/{id}")
    ResponseResult<CategoryVo> findById(@PathVariable("id") String id);
}
